package cn.tedu._07weibopjt.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserRegDTO {
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}$|^[a-zA-Z0-9]{1,14}$",message="用户名不能超过七个汉字或14个英文字符")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    @Size(min=6,max=12,message="密码在6-18位以内")
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    @NotBlank(message="昵称不能为空串")
    private String nickname;


}
